var express = require('express');
var router = express.Router();
const mysql=require('mysql');
const connection=require('../public/javascripts/mysql');
/* GET home page. */

connection.query('SELECT * FROM goods limit ?,?', [1,10],(error, results, fields) => {
    console.log(results)
});

router.post('/hot', function(req, res, next) {
    connection.query('SELECT * FROM goods limit 1,10', [req.body.id],(error, results, fields) => {
        res.json(results[0]);
    });
});







module.exports = router;
